import Layouts from '@/layouts';
import AppContent from '@/layouts/components/AppContent.vue';
import wizardLayout from '@/layouts/wizardLayout/index.vue';

/**
 *  path: "/login",   ------Page Address                                         
    meta: {
      title: "登录",    ------Page Title
      icon: "el-icon-user-solid",  ------Menu icon
      oneself: true,  ------Whether to open on a separate page
      hide: true,  ------Whether to hide the menu
      groups: 'admin|carrier'------User grouping
    },
    component: () => import("@/views/login/index.vue"),  ------组件地址
 */

export const routes = [
    {
        path: '',
        redirect: 'home',
        component: Layouts,
        children: [
            {
                path: '/home',
                name: 'databoard',
                meta: { title: 'dataBoaaBoardTitle', icon: 'el-icon-my-dataBoard', groups: 'user|admin|carrier' },
                component: () => import('@/views/databoard')
            },
            {
                path: '/netWork',
                meta: { title: 'netWotWorkTitle', icon: 'el-icon-my-netWork', groups: 'admin|carrier' },
                component: AppContent,
                children: [
                    {
                        path: 'mobileSettings',
                        meta: { title: 'netWottings.mobileSesTitle', icon: 'el-icon-my-second', groups: 'admin|carrier' },
                        component: () => import('@/views/netWork/mobileSettings')
                    },
                    {
                        path: 'wifiSettings',
                        meta: { title: 'netWoettings.wifiSettTitle', icon: 'el-icon-my-second', groups: 'admin|carrier' },
                        component: () => import('@/views/netWork/wifiSettings')
                    },
                    {
                        path: 'lanSettings',
                        meta: { title: 'netWork.lanSetSettle', icon: 'el-icon-my-second', groups: 'admin|carrier' },
                        component: () => import('@/views/netWork/lanSettings')
                    },
                    // {
                    //     path: 'staticRouteSettings',
                    //     meta: { title: 'netWork.staticRouteSettings.staticRouteSettingsTitle', icon: 'el-icon-my-second', groups: 'admin|carrier' },
                    //     component: () => import('@/views/netWork/staticRouteSettings')
                    // },
                    // {
                    //     path: 'ipv6Settings',
                    //     meta: { title: 'netWork.ipv6Settings.ipv6SettingsTitle', icon: 'el-icon-my-second', groups: 'admin|carrier' },
                    //     component: () => import('@/views/netWork/ipv6Settings')
                    // },
                    // {
                    //     path: 'natSettings',
                    //     meta: { title: 'netWork.natSettings.natSettingsTitle', icon: 'el-icon-my-second', groups: 'admin|carrier' },
                    //     component: () => import('@/views/netWork/natSettings')
                    // }
                    // ,
                    // {
                    //     path: 'ddnsSettings',
                    //     meta: { title: 'netWork.ddnsSettings.ddnsSettingsTitle', icon: 'el-icon-my-second', groups: 'admin|carrier' },
                    //     component: () => import('@/views/netWork/ddnsSettings')
                    // },
                    // {
                    //     path: 'vpnSetting',
                    //     meta: { title: 'netWork.vpnSetting.vpnSettingTitle', icon: 'el-icon-my-second', groups: 'admin|carrier' },
                    //     component: () => import('@/views/netWork/vpnSetting')
                    // }
                ]
            },
            
            {
                path: '/netWork/mobileSettings/apnSettings',
                name: 'apnSettings',
                meta: { title: 'netWnSettpnSettiitle', icon: 'el-icon-s-home', hide: true, groups: 'admin|carrier' }, //hidden
                component: () => import('@/views/netWork/mobileSettings/mApnSettings')
            },
            // {
            //     path: '/home/monthlyusage',
            //     name: 'monthlyUsage',
            //     meta: { title: 'monthlyUsage.monthlyUsageTitle', icon: 'el-icon-s-home', hide: true, groups: 'user|admin|carrier' }, //hidden
            //     component: () => import('@/views/databoard/monthlyUsage')
            // },
            // {
            //     path: '/home/sessionusage',
            //     name: 'sessionUsage',
            //     meta: { title: 'sessionUsage.sessionUsageTitle', icon: 'el-icon-s-home', hide: true, groups: 'user|admin|carrier' }, //hidden
            //     component: () => import('@/views/databoard/sessionUsage')
            // }
        ]
    },
    {
        path: '/404',
        name: '404',
        meta: {
            title: '404',
            oneself: true,
            hide: true
        },
        component: () => import('@/views/exception/404')
    },
    {
        path: '/login',
        name: 'Login',
        meta: {
            title: 'common.loginButton',
            oneself: true,
            hide: true
        },
        component: () => import('@/views/login')
    },
    {
        path: '*',
        redirect: 'home'
    },
    {
        path: '',
        component: wizardLayout,
        children: [
            {
                path: 'wizard',
                name: 'wizard',
                meta: { title: 'wizard.title', hide: true },
                component: () => import('@/views/wizard/index.vue')
            },
            {
                path: '/wizard/ConnectionDetection',
                name: 'ConnectionDetection',
                meta: { title: 'wizard.connectionDetection', hide: true },
                component: () => import('@/views/wizard/components/ConnectionDetection.vue')
            },
            {
                path: '/wizard/BasicSettings',
                name: 'BasicSettings',
                meta: { title: 'wizard.basicSettings', hide: true },
                component: () => import('@/views/wizard/components/BasicSettings.vue')
            },
            {
                path: '/wizard/Completed',
                name: 'Completed',
                meta: { title: 'wizard.completed', hide: true },
                component: () => import('@/views/wizard/components/Completed.vue')
            }
        ]
    }
];
